<div ng-init="init();" class="kmi-layout-content setting-content">
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <img src='image/smes_v340/W_Com_DropLeft_nor_32.png'></img>
            <div class="kmi-can-click"></div>
        </div>
        <div class="brand-title">
            <div class="custom" ng-if="companyName">
                <div class="title" ng-bind="companyName"></div>
                <img src="" alt="" class="brand">
                <div class="gap"></div>
            </div>
            <div class="digiwin">
                <img src="image/smes_v340/logo_ch.png" alt="">
                <img src="image/smes_v340/logo_en.png" alt="">
            </div>
        </div>
        <div class="header-title" ng-bind="'Setting.title' | translate"></div>
        <div class="header-logo"></div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page setting-sidebar-left">
            <div class="option-wrapper">
                <div class="kmi-text-fields--triangle fields-ip" ng-disabled="parent!='login'">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.server.ip' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="ip input" ng-repeat="ip in serverIp track by $index">
                                <input type="text" mdl-calculater="serverIp[$index]"
                                    ng-disabled="parent!='login'"></input>
                                <div class="split-line"></div>
                            </div>
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle" ng-disabled="parent!='login'">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.server.port' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <input type="text" mdl-calculater="config.server.port" ng-disabled="parent!='login'"></input>
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle" ng-disabled="parent!='login'">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.default_ac' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <input type="text" ng-model="config.setting.account" ng-disabled="parent!='login'"></input>
                            <div class="split-line"></div>
                            <input type="password" ng-model="config.setting.password" ng-disabled="parent!='login'"></input>
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.RefreshTime' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <input type="text" mdl-calculater="config.setting.RefreshTime"></input>
                        </div>
                    </div>
                    <div class="unit">
                        <label class="tip" ng-bind="'Setting.second' | translate"></label>
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.OperatingArea' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <input type="text" ng-model="config.setting.OperatingArea"></input>
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.autoLogin' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.autoLogin === 'Y' }">
                                <div class="toggle" ng-click="config.setting.autoLogin = config.setting.autoLogin === 'Y' ? 'N' : 'Y';">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3" ng-if="$root.isElectron">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.fullScreen' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.fullScreen === 'Y' }">
                                <div class="toggle" ng-click="config.setting.fullScreen = config.setting.fullScreen === 'Y' ? 'N' : 'Y';">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3" ng-if="$root.isElectron">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.virtualKeyboard' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.virtualKeyboard === 'Y' }">
                                <div class="toggle" ng-click="config.setting.virtualKeyboard = config.setting.virtualKeyboard === 'Y' ? 'N' : 'Y';">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3" ng-if="$root.isElectron">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.outsidePDF' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.outsidePDF === 'Y' }">
                                <div class="toggle" ng-click="config.setting.outsidePDF = config.setting.outsidePDF === 'Y' ? 'N' : 'Y';">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3" ng-if="config.cache.device != 'phone'">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.workstating_mode' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.workstating_mode === 'Y' }">
                                <div class="toggle" ng-click="config.setting.workstating_mode = config.setting.workstating_mode === 'Y' ? 'N' : 'Y';">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <!-- 掃描模式 add by Oliver 20200709 for 鑫森海-->
                <div class="kmi-text-fields--triangle text-fields-group3">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.scan_mode' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.scanBarcod === 'Y' }">
                                <div class="toggle" ng-click="config.setting.scanBarcod = config.setting.scanBarcod === 'Y' ? 'N' : 'Y';">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                 <!-- 掃描加载报工任务 add by shiwl 20221125 -->
                 <div class="kmi-text-fields--triangle text-fields-group3">
                        <div class="main">
                            <div class="label">
                                <label ng-bind="'Setting.scan_load_reporting_task' | translate"></label>
                                <label class="triangle"></label>
                            </div>
                            <div class="input">
                                <div class="toggle-component" ng-class="{ 'active': config.setting.scanLoadReportingTask === 'Y' }">
                                    <div class="toggle" ng-click="config.setting.scanLoadReportingTask = config.setting.scanLoadReportingTask === 'Y' ? 'N' : 'Y';">
                                        <div class="dot"></div>
                                    </div>
                                </div>  
                            </div>
                        </div>
                        <div class="unit">
                        </div>
                    </div>
                <!-- 20230222 modify by Alan for M#0128751 -->
                <div class="kmi-text-fields--triangle text-fields-group3" ng-if="$root.isElectron">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.externalReport' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.externalWindow === 'Y' }">
                                <div class="toggle" ng-click="config.setting.externalWindow = config.setting.externalWindow === 'Y' ? 'N' : 'Y';">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3" disabled ng-if="config.standardVersion != ''">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.standardVersion' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <input type="text" ng-model="config.standardVersion" disabled></input>
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.fontsize' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input" style="color: #000;">
                            <div style="padding: 0px 8px 0px 8px;width: 100%;">
                                <input class="slider" type="range" min="12" max="21" ng-model="config.setting.fontSize" step="1" ng-change="change();" >
                            </div>
                            <label ng-bind="fontPercentage()" style="padding: 0px 8px 0px 0px;"></label>
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <!-- 20231206 add by Alan for#152125 : 是否開啟視窗尺寸保存功能 -->
                <div class="kmi-text-fields--triangle text-fields-group3" ng-if="$root.isElectron">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.windowSize' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <div class="toggle-component" ng-class="{ 'active': config.setting.isSaveWindowSize === true }">
                                <div class="toggle" ng-click="config.setting.isSaveWindowSize = !config.setting.isSaveWindowSize">
                                    <div class="dot"></div>
                                </div>
                            </div>  
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
                <div class="kmi-text-fields--triangle text-fields-group3">
                    <div class="main">
                        <div class="label">
                            <label ng-bind="'Setting.version' | translate"></label>
                            <label class="triangle"></label>
                        </div>
                        <div class="input">
                            <input type="text" ng-model="config.appVersion" disabled></input>
                            <div class="kmi-button module-version icon">
                                <div class="icon">
                                    <img src="image/smes_v340/W_Information_nor_32.png" alt="">
                                </div>
                                <label ng-bind="'Setting.moduleVersion' | translate"></label>
                                <div class="kmi-can-click" ng-click="showModuleVersion();"></div>
                            </div>
                        </div>
                    </div>
                    <div class="unit">
                    </div>
                </div>
            </div>
            <div class="vertical-border"></div>
        </div>
        <div class="kmi-layout-page setting-sidebar-right">
            <div class="kmi-button setting-right-btn icon" ng-click="loadLoaclizationList();">
                <div class="icon">
                    <img src="image/smes_v340/W_Com_Language_nor_32.png" alt="">
                </div>
                <label ng-bind="'Setting.localizationList' | translate"></label>
                <div class="kmi-can-click"></div>
            </div>
            <div class="kmi-button setting-right-btn icon" ng-show="parent!='login' && device != 'phone'">
                <div class="icon">
                    <img src="image/smes_v340/W_Com_Lock_nor_32.png" alt="">
                </div>
                <label ng-bind="'Setting.changePassword' | translate"></label>
                <div class="kmi-can-click" ng-click="changePassword();"></div>
            </div>
            <div class="kmi-button setting-right-btn version-change-btn icon" ng-if="parent === 'login'">
                <div class="icon">
                    <img src="image/smes_v340/W_Information_nor_32.png" alt="">
                </div>
                <label ng-bind="'Setting.version_change.title' | translate"></label>
                <div ng-if="parent == 'login'" class="kmi-can-click" ng-click="changeVersion();"></div>
            </div>
            <div class="kmi-button setting-right-btn icon" ng-if="$root.isElectron">
                <div class="icon">
                    <img src="image/smes_v340/W_Com_History_nor_32.png" />
                </div>
                <label ng-bind="'Setting.logging' | translate"></label>
                <div class="kmi-can-click" ng-click="showLogging();"></div>
            </div>
            <div class="kmi-button setting-right-btn logout-btn icon" ng-if="parent != 'login'">
                <div class="icon">
                    <img src="image/smes_v340/W_Com_Logout_nor_32.png" />
                </div>
                <label ng-bind="'Logout' | translate"></label>
                <div class="kmi-can-click" ng-click="logout();"></div>
            </div>
            <div class="kmi-layout-footer">
                <div class="kmi-button confirm">
                    <label ng-bind="'common.btn.confirm' | translate"></label>
                    <div class="kmi-can-click" ng-click="confirm();"></div>
                </div>
            </div>
        </div>
    </div>
</div>